package com.example.demo.controller;

import com.example.demo.manage.AliyunOSS;
import com.example.demo.mongo.entity.MDeviceRelat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: wn
 * @Date: 2021/8/3 14:42
 * @Version 1.0
 * @Note
 */
@CrossOrigin
@RestController
@RequestMapping("/oss")
public class OSSController {

    @Autowired
    private AliyunOSS aliyunOSS;

    @GetMapping("/getStsCert")
    public Map<String, String> getStsCert() {
        return aliyunOSS.getStsCert();
    }
}
